import { request } from "../request";

export const apiSysUserPagePost = (data:any)=>{
    return request({
        url:'/api/sysUser/page',
        method:'POST',
        data
    })
}

export const apiSysUserOwnRoleListUserIdGet = (userId:number)=>{
    return request({
        method:'GET',
        url:`/api/sysUser/ownRoleList/${userId}`
    })
}

export const apiSysUserOwnExtOrgListUserIdGet = (userId:number)=>{
    return request({
        method:'GET',
        url:`/api/sysUser/ownExtOrgList/${userId}`
    })
}

export const apiSysUserUpdatePost = (data:any)=>{
    return request({
        method:'POST',
        url:'/api/sysUser/update',
        data
    })
}
export const apiSysUserAddPost = (data:any)=>{
    return request({
        method:'POST',
        url:'/api/sysUser/add',
        data
    })
}

export const apiSysUserDeletePost = (data:any)=>{
    return request({
        method:'POST',
        url:'/api/sysUser/delete',
        data
    })
}

export const apiSysUserResetPwdPost = (data:any)=>{
    return request({
        method:'POST',
        url:'/api/sysUser/resetPwd',
        data
    })
}

export const apiSysUserSetStatusPost = (data:any)=>{
    return request({
        method:'POST',
        url:'/api/sysUser/setStatus',
        data
    })
}

export const apiSysUserBaseInfoGet = ()=>{
    return request({
        method:'GET',
        url:'/api/sysUser/baseInfo'
    })
}

export const apiSysUserBaseInfoPost = (data:any)=>{
    return request({
        method:"POST",
        url:"/api/sysUser/baseInfo",
        data
    })
}

export const apiSysUserChangePwdPost = (data:any)=>{
    return request({
        method:"POST",
        url:"/api/sysUser/changePwd",
        data
    })
}